home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / dos / setioerr.c < prev    next >
C/C++ Source or Header  |  1996-09-12  |  1KB  |  71 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: setioerr.c,v 1.3 1996/08/13 13:52:51 digulla Exp $
  4.     $Log: setioerr.c,v $
  5.     Revision 1.3  1996/08/13 13:52:51  digulla
  6.     Replaced <dos/dosextens.h> by "dos_intern.h" or added "dos_intern.h"
  7.     Replaced __AROS_LA by __AROS_LHA
  8.  
  9.     Revision 1.2  1996/08/01 17:40:58  digulla
  10.     Added standard header for all files
  11.  
  12.     Desc:
  13.     Lang: english
  14. */
  15. #include <clib/exec_protos.h>
  16. #include "dos_intern.h"
  17.  
  18. /*****************************************************************************
  19.  
  20.     NAME */
  21.     #include <clib/dos_protos.h>
  22.  
  23.     __AROS_LH1(LONG, SetIoErr,
  24.  
  25. /*  SYNOPSIS */
  26.     __AROS_LHA(LONG, result, D1),
  27.  
  28. /*  LOCATION */
  29.     struct DosLibrary *, DOSBase, 77, Dos)
  30.  
  31. /*  FUNCTION
  32.     Sets to dos error code for the current process.
  33.  
  34.     INPUTS
  35.     result - new error code
  36.  
  37.     RESULT
  38.     Old error code.
  39.  
  40.     NOTES
  41.  
  42.     EXAMPLE
  43.  
  44.     BUGS
  45.  
  46.     SEE ALSO
  47.  
  48.     INTERNALS
  49.  
  50.     HISTORY
  51.     29-10-95    digulla automatically created from
  52.                 dos_lib.fd and clib/dos_protos.h
  53.  
  54. *****************************************************************************/
  55. {
  56.     __AROS_FUNC_INIT
  57.     __AROS_BASE_EXT_DECL(struct DosLibrary *,DOSBase)
  58.  
  59.     /* old contents */
  60.     LONG old;
  61.  
  62.     /* Get pointer to process structure */
  63.     struct Process *me=(struct Process *)FindTask(NULL);
  64.  
  65.     /* Nothing spectacular */
  66.     old=me->pr_Result2;
  67.     me->pr_Result2=result;
  68.     return old;
  69.     __AROS_FUNC_EXIT
  70. } /* SetIoErr */
  71.